//2009/08/26 16:31:05
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class RussianSpeedLimits
{
public:
    int getCurrentLimit(vector <string> signs)
    {
		int speed = 60;
		bool flag = true;
		for(int i=0; i<signs.size(); i++)
		{
			if(signs[i] == "default")
			{
				if(flag) speed = 60;
				else speed = 90;
			}
			else if(signs[i] == "city")
			{
				if(flag) speed = 90, flag = false;
				else speed = 60, flag = true;
			}
			else
			{
				stringstream s(signs[i]);
				int a;
				s >> a;
				speed = a;
			}
		}
		return speed;
    }
};
